.TH localtime 3 "" "" ""
.SH SYNOPSIS
localtime \- convert time to local representation
.SH ANSI_SYNOPSIS
#include <time.h>
.br
struct tm *localtime(time_t *
.IR clock );
.br
struct tm *localtime_r(time_t *
.IR clock ,
struct tm *
.IR res );
.br
.SH TRAD_SYNOPSIS
#include <time.h>
.br
struct tm *localtime(
.IR clock )
.br
time_t *
.IR clock ;
.br
struct tm *localtime(
.IR clock ,
.IR res )
.br
time_t *
.IR clock ;
.br
struct tm *
.IR res ;
.br
.SH DESCRIPTION
.BR localtime 
converts the time at 
.IR clock 
into local time, then
converts its representation from the arithmetic representation to the
traditional representation defined by 
.BR struct tm .

.BR localtime 
constructs the traditional time representation in static
storage; each call to 
.BR gmtime 
or 
.BR localtime 
will overwrite the
information generated by previous calls to either function.

.BR mktime 
is the inverse of 
.BR localtime .
.SH RETURNS
A pointer to the traditional time representation (
.BR struct tm ).
.SH PORTABILITY
ANSI C requires 
.BR localtime .

.BR localtime 
requires no supporting OS subroutines.
.SH SOURCE
src/newlib/libc/time/lcltime.c
